import ajax from '../utils/axios'

export async function adderList(userId) {
  const res = await ajax.get(`/api/address/list?userId=${userId}`)
  return res.data.data
}

export async function deleteAdder(ids) {
  const res = await ajax.post(`/api/address/delete?ids=${ids}`)
  return res.data.data
}

export async function updateAddress(params) {
  const res = await ajax.post(`/api/address/update`, params)
  return res.data.data
}

export async function createAdder(params) {
  const res = await ajax.post(`/api/address/create`, params)
  return res.data.data
}
